Skip to content

Conversation

@erichiggins
Copy link
Owner

Intended to resolve #15
Add internal caching. Hardcode instead of compute. Functions instead of obj methods. RegEx instead of loose date-string checks.

gaek/ndb_json.py Outdated
)


DATE_RE = re.compile(r'\d{4}[-/]\d{2}[-/]\d{2}')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would probably be faster if you anchored it to the beginning of the line (with '^'). I assume that would be a reasonable thing to do.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Done.

@erichiggins erichiggins self-assigned this Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve performance of ndb_json module

3 participants